/*
 * i2c.h
 *
 *  Created on: 2024年4月10日
 *      Author: NI
 */

#ifndef I2C_PLATFROM_I2C_PLATFROM_H_
#define I2C_PLATFROM_I2C_PLATFROM_H_

#include <stdint.h>

extern int capture_i2c_open(const char *path);
extern int capture_i2c_close(int fd);
extern int capture_i2c_set_speed(int fd, uint32_t speed);
extern int capture_i2c_rd(int fd, uint32_t dev_addr, uint8_t reg_addr, uint8_t *data);
extern int capture_i2c_wr(int fd, uint32_t dev_addr, uint8_t reg_addr, uint8_t data);
extern int capture_i2c_dump(int fd, uint32_t dev_addr, uint8_t reg_addr, uint8_t *data, uint32_t size);

#endif /* I2C_PLATFROM_I2C_PLATFROM_H_ */
